package crm.sfh.server;

import crm.sfh.server.entity.EUser;

import cn.bmob.v3.BmobObject;

/**
 * 功能描述:用户服务
 *
 * @date 2018/5/1
 */
public class SUser extends BmobObject {
    String name;
    String password;
    String phone;
    String url;
    /**
     * 性别
     */
    String sex;
    /**
     * 地址
     */
    String address;

    /**
     * 职业类型 0 学生 1上班族
     */
    String degreeType;

    /**
     * 财力
     */
    Long wealth;
    /**
     * 魅力
     */
    Long charm;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDegreeType() {
        return degreeType;
    }

    public void setDegreeType(String degreeType) {
        this.degreeType = degreeType;
    }

    public Long getWealth() {
        return wealth;
    }

    public void setWealth(Long wealth) {
        this.wealth = wealth;
    }

    public Long getCharm() {
        return charm;
    }

    public void setCharm(Long charm) {
        this.charm = charm;
    }

    public EUser getUser() {
        EUser eUser = new EUser();
        eUser.setPhone(phone);
        eUser.setName(name);
        eUser.setUserId(getObjectId());
        eUser.setSex(sex);
        eUser.setHead(url);
        eUser.setDegreeType(degreeType);
        eUser.setCharm(charm==null?0L:charm);
        eUser.setAddress(address);
        eUser.setWealth(wealth==null?0L:wealth);
        return eUser;
    }

}
